import zhCN from '../locales/zh-CN';

export type MessageSchema = typeof zhCN;
export type MessagePath = keyof typeof zhCN;

// 递归获取所有可能的路径
export type MessageKeys = {
  [K in keyof MessageSchema]: MessageSchema[K] extends Record<string, any>
    ? `${K & string}.${keyof MessageSchema[K] & string}`
    : K;
}[keyof MessageSchema];

// 用于类型检查的辅助函数
export function typedT<K extends MessageKeys>(key: K): string {
  return key;
} 